# Contributor: <xmingske@gmail.com>
# Contributor: Arch3y <arch3y@riseup.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=httrack
pkgver=3.49.2
pkgrel=5
pkgdesc="Website Copier - Free Software Offline Browser"
url="http://www.httrack.com/"
arch="all"
license="GPL-3.0"
makedepends="zlib-dev openssl-dev>3 libtool"
source="http://mirror.httrack.com/historical/${pkgname}-${pkgver}.tar.gz"
subpackages="$pkgname-doc"
builddir="$srcdir/$pkgname-$pkgver"
options="!check"

prepare() {
	default_prepare

	update_config_guess
	update_config_sub
 }

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--datadir=/usr/share \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-static \
		--disable-dependency-tracking \
		--localstatedir=/var/lib \
		--docdir=/usr/share/doc/httrack
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="84a13a776b278533f7f0635ebd764387c3399b01c0644d8af9b46fc8112dc3c6e568c17969d4f6c2db32b5474344c39f86cf51957c09eb807ebe305a554ba5c8  httrack-3.49.2.tar.gz"
